package com.task.myapplication11;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import java.util.ArrayList;

public class Show extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_show);
        ListView listView=findViewById(R.id.device);
        Intent intent=getIntent();
        int count=intent.getIntExtra("count",0);
        ArrayList<String> arrayList=new ArrayList<String>();
        for(int i=0;i<count;i++)
        {
            arrayList.add(intent.getStringExtra(Integer.toString(i)));
        }
        ArrayAdapter<String> arrayAdapter=new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,arrayList);
        listView.setAdapter(arrayAdapter);
    }
    public void web(View view) {
        Intent intent=new Intent(Show.this,myWebView.class);
        startActivity(intent);
    }
}